package com.example.flutter_channel

import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine

class MainActivity: FlutterActivity() {

    override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
        super.configureFlutterEngine(flutterEngine)
        //添加通道
        if (!flutterEngine.plugins.has(MyFlutterPlugin::class.java)) {
            flutterEngine.plugins.add(MyFlutterPlugin.getInstance())
        }
    }
}
